package com.example.demo.login;

import com.example.demo.login.loginbean.TUser;
import com.example.demo.login.loginservice.LoginService;
import com.example.demo.utils.ResultJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: mengxianwei
 * @Date: 2020/12/16/4:41 PM
 * @Description:
 */
@RestController
@RequestMapping("/mxw")
public class LoginController {
    @Autowired
    private LoginService loginService;

    @RequestMapping(value = "/login",method = RequestMethod.POST)
    public ResultJson login( TUser user){
        return  loginService.getLoginInfo(user);
    }



    @RequestMapping(value = "/regist",method = RequestMethod.POST)
    public ResultJson regist( TUser user){
        return  loginService.insertLoginInfo(user);
    }
}
